using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using Web.Core.Providers;

namespace Web.Core.Objects
{
    public class Logs
    {
        public static ArrayList GetAllLogs()
        {
            return DataProvider.GetInstance().GetLogs(new Log(0, 0, "", "", "", "", ""), 1, 0);
        }

        public static ArrayList GetLogByPage(int pageNumber, int pageSize)
        {
            return DataProvider.GetInstance().GetLogs(new Log(0, 0, "", "", "", "", ""), pageNumber, pageSize);
        }

        public static int InsertLog(Log l)
        {
            return DataProvider.GetInstance().InsertDeleteUpdateLog(l, GlobalStorage.Action.Insert);
        }

        public static int DeleteLog(Log l)
        {
            return DataProvider.GetInstance().InsertDeleteUpdateLog(l, GlobalStorage.Action.Delete);
        }

        public static int UpdateLog(Log l)
        {
            return DataProvider.GetInstance().InsertDeleteUpdateLog(l, GlobalStorage.Action.Update);
        }

        public static int CountAllLogs()
        {
            return DataProvider.GetInstance().CountLogs(new Log(0, 0, "", "", "", "", ""));
        }
    }
}
